PROC_NAME = cpp_base64
PROC_EXT = .exe
CC = g++

INCLUDE =  
CFLAGS = -O0 -g3 -Wall -fmessage-length=0 -MMD -MP
LFLAGS = 
LLIBS = 

SRCS = cpp_base64.cpp base64_one.cpp base64_two.cpp
OBJECT_PATH = .objs
SRCS_PATH = src

OBJS = $(SRCS:%.cpp=$(OBJECT_PATH)/%.o)

all: dir $(PROC_NAME)

$(PROC_NAME): $(OBJS)
	$(CC)  -o $@ $^ $(LLIBS) $(LFLAGS) 
	
$(OBJECT_PATH)/%.o: $(SRCS_PATH)/%.cpp
	if [ ! -f $(dir $@) ]; then mkdir -p $(dir $@); fi
	$(CC) -c -o $@ $(CFLAGS) $(INCLUDE) -MF"$(OBJECT_PATH)/$*.d" -MT"$(OBJECT_PATH)/$*.d" $<
	
clean:
	rm -rf $(OBJECT_PATH) $(PROC_NAME)

dir:
	if [ ! -f ${OBJECT_PATH} ] ; then mkdir -p ${OBJECT_PATH}; fi